{% extends 'base.html' %}
{% block title %}  - Alphabetical search for assets {% endblock %}

{% block content %}
<script type="text/javascript" src="/site_media/js/user.js"></script>
<div id="content" style="position:absolute; top:20px; left:0px; background-color: #1A1A1A; layer-background-color: #1A1A1A; border: 1px none #000000;">
<table width="800">
	<tr>
		<td colspan="2"><p><span style="font-size:14px;color:#CCC">Search in alphabetical order</span></p></td>
	</tr>
	<tr>
		<td>
			<b>{% for x in abc %}
			<a href="/user/search/abc/asset/?key={{x|lower}}"> {{x}} </a>| 
			{% endfor %}</b>
		</td>
		<td align="center">
			<a href="/user/search/abc/asset/">View All</a>
		</td>
    </tr>
    <tr><td>
    	Artist <input name="search" type="radio" value="/user/search/abc/" onclick="window.location=this.value;" /> 
	  	Asset <input name="search" type="radio" value="/user/search/abc/asset/" onclick="window.location=this.value;" checked/> 
    </td></tr>
    <tr>
    	<td colspan="2"><br><br />
			<p>Asset list | 
			{% if assets.has_previous %} 
				<a href="?page={{ assets.previous_page_number }}" title="Previous page"><<<</a> 
			{% endif %}
				Page {{ assets.number }} of {{ assets.paginator.num_pages }}.
			{% if assets.has_next %}
				<a href="?page={{ assets.next_page_number }}" title="Next page">>>></a>
			{% endif %}</p>
		</td>
	</tr>    
</table>

<table id='form table' width="800">
	<tr>
		<th width="75"></th>
		<th width="75">Type</th>
		<th width="75">Title</th>
		<th width="75">Description</th>
		<th width="100">url</th>
		<th width="50">Creator</th>
	</tr>
	{% for a in assets.object_list %}
	<tr>
		<td>
			<a href="javascript:;artist_assets({{a.user.id}});">
				<img src="/{{a.avatar}}" height="50">
			</a>
		</td>
		<td><a href="/user/{{artist.id}}/" >{{a.type_}}</a></td>
		<td><a href="/user/{{artist.id}}/" >{{a.title}}</a></td>
		<td><a href="/user/{{artist.id}}/" >{{a.text}}</a></td>
		<td><a href="/{{a.url}}"> download </a></td>
        <td><a href="/user/{{a.user.id}}/" >{{a.user.username}}</a></td>
	</tr>
	{% endfor %}
</table>
</div>
<div id="dialog"></div>
{% endblock %}